package com.jxs;

public class Demo2 {
    public static int k = 0;
    public static Demo2 t1 = new Demo2("t1");
    public static Demo2 t2 = new Demo2("t2");
    public static int i = print("i");
    public static int j = print("j");
    public static int n = 99;

    {
        print("constructor code");
    }
    static {
        print("static code");
    }
    public static int print(String s) {
        System.out.println("i="+i +"   "+s+ "  k=" + k + "  n=" + n + "   j=" + j);
        ++i;
        ++k;
        ++n;
        return i;
    }
    public Demo2(String string) {

        print(string);
    }
    public static void main(String[] args) {
        Demo2 d = new Demo2("T");
    }
}
